package com.example.midprojcampusspringboot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.midprojcampusspringboot.domain.entity.User;
import com.example.midprojcampusspringboot.domain.vo.UserQueryVo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserService extends IService<User> {

    /**
     * 3.用户查询：按照名字或id查询。
     *
     **/
    List<UserQueryVo> getUserByIdOrLoginName(Long id, String loginName);

    void register(User user);

    String generateJwt(String loginName);

    User findByUsername(String principal);

}
